<?php
class Login_Data_Forgot {
	
	public $form;
	
	public function __construct(){
		$this->form = new Core_Driver_Firstform();
	}
	
	public function getData(){
		$data = array();
		$data['form'] = $this->createForm();
		return $data;
	}
	
	public function createForm(){
		$forgotForm = $this->form->startForm(
			array(
			"method" => "post",
					"action" => SERVER_ROOT . "?login&page=forgoten",
					"id" => "forgot",
					"style" => "width: 50%"
		)
		);
		$forgotForm .= $this->form->inputForm(
			array(
			"type" => "hidden",
					"name" => "userEmail",
					"value" => "true"
		),
				null
		);
		$forgotForm .= FORGOT_PASSWORD_MESSAGE;
		$forgotForm .= "<ul>";
		$forgotForm .= "<li>";
		$forgotForm .= $this->form->labelForm(
			array(
			"for" => "email"
		),
				FORGOT_EMAIL,
				null
		);
		$forgotForm .= $this->form->inputForm(
			array(
			"id" => "email",
					"name" => "email",
					"type" => "email",
					"placeholder" => FORGOT_EMAIL_PLACEHOLDER,
					"maxlength" => "20"
		),
				"required autofocus"
		);
		$forgotForm .= "</li>";
		$forgotForm .= "</ul>";
		$forgotForm .= '<div class="buttons">';
		$forgotForm .= $this->form->inputForm(
			array(
			"type" => "submit",
					"name" => "submit",
					"value" => FORGOT_BUTTON,
					"id" => "submit"
		),
				null
		);
		$forgotForm .= '</div>';
		$forgotForm .= $this->form->endForm();
		return $forgotForm;
	}
	
}